package guize

const (
	FileSizeLimit = 3 * 1024 * 1024 // 文件大小限制为 3MB
	CharLimit     = 200             // 字符数限制为 100
)

var (
	FileTypes = map[string]string{
		"text":     ".txt,.md,.conf,.json,",
		"config":   ".cfg,.conf,.ini,.properties,.config,.xml,.env,",
		"database": ".sql,.yaml,.yml,",
	}
)

var Blacklist = []string{
	"PUT / ",
	"Newuser=\"\"",
	"var password = signer.getDateTime() + 'Z' + signer.signature()",
	"- auth: a string for basic authentication. For example `username:password`",
	"var password = signer.getDateTime() + 'Z' + signer.signature()",
	"GET /",
	"POST /",
	"{{BaseURL}}/",
	"jndi:ldap",
	"Sec-Fetch-User:",
	"username: ${{",
	"- Fixed WP3.3 bug with {user:***} merge tag.",
	"NOTICE TO USER: Carefully read the following legal agreement.",
	"[\"user\"]",
	"X-NITRO-USER:",
	"X-NITRO-PASS:",
	"$user",
	"- './steg0_initial_root_password:/steg0_initial_root_password'",
	"username[]=",
	"$username",
	"sys.argv[2]",
	"$fromUsername",
	"$",
	"print",
	"Cookie:",
	"console.log('",
	"Username.",
	"Password.",
	"getpass",
	"[domain\\]username:password",
	"parts[0]",
	"\"{{ Password }}\"",
	"&username",
	"&password",
	"username:password",
	"\"password\"",
	"\"username\"",
	"--password=@@VBOX_INSERT_USER_PASSWORD_SH@@",
	"sys.argv[3]",
	"user +",
	"paswword +",
	"username +",
	"Poisonedbyuser:",
	"or '1=1",
	"username:::password",
	"Authorization:",
	"arg1",
	"--- PASS: ",
	"user:pass",
	"password={{{",
	"username={{{",
	"Sec-Fetch-User",
	"windmp",
	"path:",
	"body:",
	"{{username}}",
	"{{password}}",
	"http://",
	"https://",
	"\"description\":",
	"\"documentation\"",
	"\"PASSWORD\"",
	"\"USERNAME\"",
	"\"data\":",
	"\"uri\":",
	"exec:",
	"\"Cookie\":",
	"pkg",
	"Sync.SyncAuthManager",
	"response.status",
	"{{pass}}",
	"{{user}}",
	"- \"password=\"",
	"- 'var httpPassword",
	"username = 'username',",
	"password = 'password',",
	"function",
	"username: \"\"",
	"password: \"\"",
	"- 'Password='",
	"- 'password='",
	"- 'username='",
	"- 'Username='",
	"Password +",
	"['password']",
	"['username']",
	"match",
	"-\"MAXUSER:\"",
	"-\"pwdUser=\"",
	"-\"User:\"",
	"-\"UserName=\"",
	"-\"Password=\"",
	"-'username:'",
	"-'password:'",
	"-\"_password:\"",
	"@password",
	"@username",
	"Connect",
	"\\user::",
	"\\password::",
	".ReadUser",
	"Pass::",
	"<wls:",
	"<policy",
	"encryptPassword=&lt;password&gt;",
	"env ",
	"DEBUG: ",
	"NOTICE TO USER:",
	"This terminal",
	"\"PUT",
	"Looks up",
	"Not yet implemented",
	"%n",
	"creds add",
	"<!--",
	"<user",
	"<..>",
	"=\"\"",
	"\"LOGIN",
	"Mozilla/5.0",
	"'select",
	"#{",
	"#   ",
	"%user",
	"<allow",
	"### ",
	"PUT /",
	"\"TLS\" />",

	// ...
}

var RegexList = []string{

	"accessKeyId[:=]\\s*([\\w-]+)",
	"accessKeySecret[:=]\\s*([\\w-]+)",
	"(?i).*corp(Id|Secret)=(\\w+)",
	"(?i).*qq\\.im\\.(sdkappid|privateKey|identifier)=(.*)",
	"(?i)(?:user(?:name)?\\s*[=:])\\s*([\\S]+)",
	"(?i)(?:pass(?:word)?\\s*[=:])\\s*([\\S]+)",
	"(?:账户|账户名|用户名|账号|测试账户)\\s*[=：:]*\\s*([\\w@#!$%^&*-]{3,20})",
	"(?:默认口令|默认密码|口令|密码|测试密码)\\s*[=：:]*\\s*([\\w@#!$%^&*-]{3,20})",
	"jdbc\\.(driver|url|type)\\s*=(.*)",
	"#jdbc\\.(driver|url|type)\\s*=(.*)",
}

var DirNamesToSkip = []string{
	"$RECYCLE.BIN", "Windows", "proc", "Fuzzing-Dicts", "obs-studio", "AppScan Standard",
	"字典", "360safe", "Bandizip", "PotPlayer", "Bandicam", "appscan", "Fortify",
	"Microsoft Visual Studio", "sys", "bin", "boot", "dev", "media", "mnt", "run", "var/spool/",
}

var TeZhengList = []string{

	"accessKeyId[:=]\\s*([\\w-]+)",
	"accessKeySecret[:=]\\s*([\\w-]+)",
	"(?i).*corp(Id|Secret)=(\\w+)",
	"(?i).*qq\\.im\\.(sdkappid|privateKey|identifier)=(.*)",
}
